package pl.mdziedzic.unittests.basics;

import org.fest.assertions.Condition;

import pl.mdziedzic.unittests.AUCTION_STATUS;
import pl.mdziedzic.unittests.Auction;

public class IsActive extends Condition<Auction> {

	@Override
	public boolean matches(Auction auction) {

		if (auction == null) {
			return false;
		}

		if (auction.getActivateDate() == null) {
			return false;
		}

		if (AUCTION_STATUS.ACTIVE.equals(auction.getStatus()) == false) {
			return false;
		}

		return true;
	} 

}
